home *** CD-ROM | disk | FTP | other *** search
- Path: newshost.lanl.gov!tanmoy
- From: tanmoy@qcd.lanl.gov (Tanmoy Bhattacharya)
- Newsgroups: comp.lang.c
- Subject: Re: Convert a float to an int ( and round up/down ? )
- Date: 07 Mar 1996 15:13:47 GMT
- Organization: Los Alamos National Laboratory
- Message-ID: <TANMOY.96Mar7081347@qcd.lanl.gov>
- References: <826162763.17141@farlight.demon.co.uk>
- NNTP-Posting-Host: qcd.lanl.gov
- Mime-Version: 1.0
- Content-Type: text
- In-reply-to: j shipley's message of Thu, 07 Mar 1996 01:39:23 GMT
-
- In article <826162763.17141@farlight.demon.co.uk>
- j shipley <jonathan@farlight.demon.co.uk> writes:
-
- js: I am trying to convert a variable of type float to an int.
- js:
- js: How can this be done?
-
- Show some code (i.e. write a _small_ complete program which deos not
- work. Post it here so that we can figure out what you are doing wrong.)
-
- js:
- js: I have tried (int) variable
- js: i.e what I thought a cast was, but it does not work.
-
- `does not work' is too vague a description. What happens?
-
- Cheers
- Tanmoy
- --
- tanmoy@qcd.lanl.gov(128.165.23.46) DECNET: BETA::"tanmoy@lanl.gov"(1.218=1242)
- Tanmoy Bhattacharya O:T-8(MS B285)LANL,NM87545 H:#9,3000,Trinity Drive,NM87544
- Others see <gopher://yaleinfo.yale.edu:7700/00/Internet-People/internet-mail>,
- <http://alpha.acast.nova.edu/cgi-bin/inmgq.pl>or<ftp://csd4.csd.uwm.edu/pub/
- internetwork-mail-guide>. -- <http://nqcd.lanl.gov/people/tanmoy/tanmoy.html>
- fax: 1 (505) 665 3003 voice: 1 (505) 665 4733 [ Home: 1 (505) 662 5596 ]
-